package hxvid.events;

typedef StreamData = Dynamic;/*
{
	var info:CommandInfos;
	var name:String;
	var id:Int;
}
{
	var info:CommandInfos;
	var name:String;
	var id:Int;
	var start:Int;
	var len:Int;
	var obj:String;
}
{
	var info:CommandInfos;
	var name:String;
	var id:Int;
	var mode:String;
}
{
	var info:CommandInfos;
	var name:String;
	var pause:Bool;
	var time:Float;
}
*/

class StreamEvent implements IEvent
{
	public static var STREAM_AUDIO_RECEIVE = "streamAudioReceive";
	public static var STREAM_CLOSE = "streamClose";
	public static var STREAM_CREATE = "streamCreate";
	public static var STREAM_DELETE = "streamDelete";
	public static var STREAM_PAUSE = "streamPause";
	public static var STREAM_PAUSE_RAW = "streamPauseRaw";
	public static var STREAM_PLAY = "streamPlay";
	public static var STREAM_PUBLISH = "streamPublish";
	public static var STREAM_SEEK = "streamSeek";
	public static var STREAM_VIDEO_RECEIVE = "streamVideoReceive";

	public var type:String;
	public var target:Client;
	public var currentTarget:Client;
	public var data:Dynamic;//StreamData;
	
	public function new(type:String, target:Client, data:StreamData)
	{
		this.type = type;
		this.target = this.currentTarget = target;
		this.data = data;
	}
}